<div id="sub_nav">
      <p>Quick Links:</p>
      <ul>
        <li><a href="javascript:void(0);" controller="blog_categories" action="add"
            title="Add"
            onclick='showPop(this)'>Add New Blog Category</a></li>

      </ul>
    </div>
<div class="breadcrumb">
    <ul id="breadcrumb">
        <li><a href="<?php echo Configure::read('base_url');?>backstage" title="Home">
		<?php echo $this->Html->image("home.png", array("alt" => "Home",'class'=>'home','border'=>'0'));?>
		</a></li>
        <li><a href="<?php echo Configure::read('base_url');?>backstage/external_links" title="External Links">Blog Categories</a></li>
    </ul>
</div>
<?php echo $this->element('admin/admin_leftmenu'); ?>
<div id="left">
    <?php
    echo $this->Session->flash();
    if ($this->Session->check('Message.auth'))
        echo $this->Session->flash('auth');
    ?>
    <div class="div_header"><?php __('Blog Categories'); ?></div>
    <div class="div_content">
        <div class="paging">
            <?php //echo $this->element('admin/cmspages/top_menu'); ?>
	</div>
           <table id="category_table" cellspacing="0" class="tablesorter">
            <thead>
                <tr>
                    <th width="50" ><?php echo _('id'); ?></th>
                    <th width="120" ><?php echo _('Title'); ?></th>                    
                    <th width="70" align="center">Actions</th>

                </tr>
            </thead>
            <tbody>
                <?php
                $i = 0;
                //pr($users);
               foreach ($blogCategories as $blogCategorie):
                    $class = null;
                    if ($i++ % 2 == 0) :
                        $class = ' class="alt"';
                ?>
                        <tr>
                            <td class="alt"> <?php echo $i; ?></td>
                            <td class="alt">
                           <?php echo $blogCategorie['BlogCategory']['title']; ?>
                            </td>                            
                    <td align="center" class="alt">
                         <a href="javascript:void(0);" controller="blog_categories" action="edit" title="Edit" ElmID="<?php echo $blogCategorie['BlogCategory']['id']; ?>" onclick='showPop(this)'>
<?php echo $this->Html->image("edit_gray.png", array("alt" => "Edit", 'border' => '0')); ?>
                        </a>&nbsp;&nbsp;
                        <?php
                        echo $this->Html->link(
                                $this->Html->image("delete_gray.png", array("alt" => "Delete", 'border' => '0')),
                                array('action' => 'delete', $blogCategorie['BlogCategory']['id']),
                                array('escape' => false), sprintf(__('Are you sure you want to delete %s?', true), null)
                        );
                        ?>
                    </td>
                </tr>
				<?php else: ?>
                <tr>
                    <td> <?php echo $i; ?></td>
                            <td>
                           <?php echo $blogCategorie['BlogCategory']['title']; ?>
                            </td>                            
                    <td align="center">
                         <a href="javascript:void(0);" controller="blog_categories" action="edit" title="Edit" ElmID="<?php echo $blogCategorie['BlogCategory']['id']; ?>" onclick='showPop(this)'>
<?php echo $this->Html->image("edit_yellow.png", array("alt" => "Edit", 'border' => '0')); ?>
                        </a>&nbsp;&nbsp;
                        <?php
                        echo $this->Html->link(
                                $this->Html->image("delete_red.png", array("alt" => "Delete", 'border' => '0')),
                                array('action' => 'delete',$blogCategorie['BlogCategory']['id']),
                                array('escape' => false), sprintf(__('Are you sure you want to delete %s?', true),null)
                        );
                        ?>
                    </td>

                </tr>
				<?php endif;endforeach;?>
                    <tbody>
                </table>

            </div>
            <div class="div_bottom"></div>
        </div>

        <!-- edit sidebar items here -->
<!--        </div>-->
<?php echo $html->script(array("jquery.pagination.js", "jquery.tablesorter.min.js", "jquery.tablednd.js")); ?>
<script type="text/javascript">
    jQuery(document).ready(function(){
        jQuery("#category_table").tablesorter({headers: {2:{sorter: false}}});
    });
</script>